home *** CD-ROM | disk | FTP | other *** search
/ MacFormat UK 76 / MF_UK_76_1.iso / Education Feature / MicroWorlds 2.03 Try Me / MicroWorlds 2.03 Try Me.rsrc / TEXT_609_local.txt < prev    next >
Encoding:
Text File  |  1998-05-08  |  436 b   |  18 lines

  1. local word-or-list 
  2.  
  3. Makes the specified variable local to the procedure where local is used. Local can only be used in a procedure. See let, make, and name.
  4.  
  5. Example: 
  6.  
  7. to move
  8. local "dist
  9. make "dist 100
  10. fd :dist
  11. end
  12.  
  13. Try the procedure in the Command Center. The turtle will move. When the procedure is over, check the value of the variables. Variables have lost their values. They don't even exist.
  14.  
  15. move
  16. show :dist
  17. dist has no value
  18.